﻿@model AutomatedTestDataManagement.Models.TestSuiteScenario

@if(ViewData["RemoveScenario"] == null)
{
                       <tr>
                           <td>
                               @Html.DisplayFor(model => model.TestScenario.ScenarioName)
                           </td>
                           <td>
                               @Html.DisplayFor(model => model.TestScenario.ScenarioDescription)
                           </td>
                           <td>
                               @Html.HiddenFor(model => model.SuiteScenarioID) 
                               @Html.HiddenFor(model => model.SuiteID)
                               @Html.HiddenFor(model=>  model.ScenarioID)
                               @if(ViewData["Delete"] == null)
                               {
                                    @Html.EditorFor(model => model.ScenarioNumber)
                                    @Html.ValidationMessageFor(model => model.ScenarioNumber)
                               }
                               else
                               {
                                   @Html.DisplayFor(model => model.ScenarioNumber)
                               }

                           </td>
                           <td>

                               @if(ViewData["Delete"] == null)
                               {
                                    @Html.ActionLink("Edit Scenario", "Edit", "TestScenario", new { id = Model.ScenarioID, suiteID = Model.SuiteID }, null) @Html.Encode(" | ") 
                                    @Html.ActionLink("Remove Scenario", "Delete", "SuiteScenarios", new { id = Model.SuiteScenarioID, suiteID = Model.SuiteID, returnToAction = "Edit" }, null)
                               } 
                               else 
                               {
                                    @Html.ActionLink("Remove Scenario", "Delete", "SuiteScenarios", new { id = Model.SuiteScenarioID, suiteID = Model.SuiteID, returnToAction = "Delete" }, null) 
                               }
                            </td>
                        </tr>
}
else
{
    <tr>
        <td>
            @Html.DisplayFor(model=>model.TestSuite.SuiteName)
        </td>
        <td>
            @Html.DisplayFor(model=>model.TestSuite.SuiteDescription)
        </td>
        <td>
            @Html.ActionLink("Remove Scenario from Suite", "Delete", "SuiteScenarios", new { id = Model.SuiteScenarioID, scenarioID = Model.ScenarioID, returnToAction = "Delete" }, null)
        </td>
    </tr>
}